API Version
Product Catalog
Library

Resource Migration is used for finding the status of customer migration between Chargebee sites.

Sample resource migration [ JSON ]

{ "from_site": "yourapp", "entity_type": "customer", "entity_id": "test123", "status": "failed", "created_at": 1528093653, "updated_at": 1528093653, "object": "resource_migration" }

API Index URL GET

https://{site}.chargebee.com/api/v2/resource_migrations

Model Class

resourcemigration.ResourceMigration
FromSite
string, min chars=4, max chars=50
Domain name to which the item is moved.
EntityType
enumerated string
Type of the entity this record is stored for
Possible values are
CustomerEntity that represents a customer
CustomerEntity that represents a customer
Show all values[+]
EntityId
string, max chars=100
Handle of the customer in the current site.
Status
enumerated string, default=failed
Status of the copy customer process.
Possible values are
ScheduledScheduledFailedFailedSucceededSucceeded
ScheduledScheduledFailedFailedSucceededSucceeded
Show all values[+]
Errors
optional, string, max chars=65k
Filled only if the copy operation gets failed
CreatedAt
timestamp(UTC) in seconds
Time the log is created
UpdatedAt
timestamp(UTC) in seconds
Time the log is updated
FromSite FromSite
string, min chars=4, max chars=50
Domain name to which the item is moved.
EntityType EntityType
enumerated string
Type of the entity this record is stored for
Possible values are
CustomerEntity that represents a customer
CustomerEntity that represents a customer
Show all values[+]
EntityId EntityId
string, max chars=100
Handle of the customer in the current site.
Status Status
enumerated string, default=failed
Status of the copy customer process.
Possible values are
ScheduledScheduledFailedFailedSucceededSucceeded
ScheduledScheduledFailedFailedSucceededSucceeded
Show all values[+]
Errors Errors
optional, string, max chars=65k
Filled only if the copy operation gets failed
CreatedAt CreatedAt
timestamp(UTC) in seconds
Time the log is created
UpdatedAt UpdatedAt
timestamp(UTC) in seconds
Time the log is updated

Gets the last migration details.

Notes

Sample Codes
 

package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    "github.com/chargebee/chargebee-go/v3/enum"
    resourcemigrationAction "github.com/chargebee/chargebee-go/v3/actions/resourcemigration"
    "github.com/chargebee/chargebee-go/v3/models/resourcemigration"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := resourcemigrationAction.RetrieveLatest(&resourcemigration.RetrieveLatestRequestParams {
        FromSite : "merchant-test",
        EntityType : enum.EntityTypeCustomer,
        EntityHandle : "test123",
    }).Request()
    if err != nil {
        fmt.Println(err)
    }else{
        ResourceMigration := res.ResourceMigration
        }
    }


copy
Click to Copy
 

package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    "github.com/chargebee/chargebee-go/v3/enum"
    resourcemigrationAction "github.com/chargebee/chargebee-go/v3/actions/resourcemigration"
    "github.com/chargebee/chargebee-go/v3/models/resourcemigration"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := resourcemigrationAction.RetrieveLatest(&resourcemigration.RetrieveLatestRequestParams {
        FromSite : "merchant-test",
        EntityType : enum.EntityTypeCustomer,
        EntityHandle : "test123",
    }).Request()
    if err != nil {
        fmt.Println(err)
    }else{
        ResourceMigration := res.ResourceMigration
        }
    }

Sample Result [ JSON ]

Show more...
{
    "resource_migration": {
        "from_site": "yourapp",
        "entity_type": "customer",
        "entity_id": "test123",
        "status": "failed",
        "created_at": 1539327043,
        "updated_at": 1539327043,
        "object": "resource_migration"
    }
}

URL Format GET

https://{site}.chargebee.com/api/v2/resource_migrations/retrieve_latest

Method

resourceMigrationAction.RetrieveLatest(&resourceMigration.RetrieveLatestRequestParams {<param name> : <value>,<param name> : <value> ...}).Request()
FromSite[]
required, string, min chars=4, max chars=50
Domain name to which the item is moved.
EntityType[]
required, enumerated string
Type of the entity this record is stored for.
Possible values are
CustomerEntity that represents a customer
CustomerEntity that represents a customer
Show all values[+]
EntityId[]
required, string, max chars=100
Handle of the customer in the current site.
ResourceMigration ResourceMigration
always returned
Resource object representing resource_migration

Sample admin console URL

https://{site}.chargebee.com/admin-console/resource_migrations/123x