Jump to content

Recommended Posts

Posted

I am attempting to provision services based on the data posted to a URL when a service is added, suspended, canceled, etc. The data posted when a service is added is adequate, but unfortunately very little information is posted when a service is suspended or canceled. The JSON below is returned when a service is added. When a service is suspended, only the package options are returned (domain_prefix, maximum_contacts, provisioning_id). It would be nice if the client_id and other information was returned when a service is suspended or canceled.

{  
   "domain_prefix":"mobile",
   "maximum_contacts":"100000",
   "provisioning_id":"123456",
   "_other":{  
      "status":"active",
      "meta":{  
         "domain_prefix":"mobile"
      },
      "notify_order":"true",
      "use_module":"true",
      "pricing_id":"32",
      "qty":"1",
      "current_qty":"1",
      "client_id":"1"
   }
}

So I am trying to create a list of all the pricing_id's in order to build a table to provision the services based on what the customer ordered. Does anyone have a simple way of creating a master list of pricing_id's?

 

Any help is appreciated.

Posted

Sounds like you need to get the plan name from the pricing ID?  You're going to need to do a MySQL query or use Packages::getByPricingId

 

Something like this should get you headed in the right direction if you go the MySQL route:

 

select * from package_pricing left join packages on package_pricing.package_id=packages.id left join pricings on package_pricing.pricing_id=pricings.id;
Posted

Actually I want to get a list of all pricing options. That way I can differentiate between monthly and yearly price options for a package. Am I correct in assuming that each price option in a package has a unique pricing_id?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...